package com.yudaxian.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yudaxian.sys.entity.Item;
import com.yudaxian.sys.entity.Item;
import com.yudaxian.sys.entity.Organization;
import com.yudaxian.sys.entity.req.ItemReq;
import com.yudaxian.sys.mapper.ItemMapper;
import com.yudaxian.sys.mapper.OrganizationMapper;
import com.yudaxian.sys.service.IItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yudaxian
 * @since 2023-12-05
 */
@Service
public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements IItemService {

    @Override
    public Item getItemById(Integer id) {
        return this.baseMapper.selectById(id);
    }

    @Override
    public void addItem(Item item) {

        this.baseMapper.insert(item);
    }

    @Override
    public void updateItem(Item item) {

        this.baseMapper.updateById(item);
    }

    @Override
    public void deleteItemById(Integer id) {
        this.baseMapper.deleteById(id);
    }

}
